Spot gold was up 0.2 percent at $1,285.26 an ounce at 12:28 p.m. EST (1728 GMT), having earlier touched its highest since June 15 at $1,288.66. US gold futures rose 0.5 percent to $1,287.30. "A sell-off in the stock markets today is prompting some safe-haven demand," said Jim Wyckoff, senior analyst at Kitco Metals.
"Gold prices hit a six-month high and the trend is up on a near-term basis which is inviting technical-based buying interest. Probably some new speculative fund money coming into the market combined to push gold prices higher despite the stronger dollar."
The dollar index rose against the euro and sterling on Wednesday.
World shares started the year on a gloomy note with poor data across Asia, the euro zone and the United States that prompted investor flows into safe haven assets, such as the yen, Treasuries and bullion.
Euro zone manufacturing activity barely expanded at the end of 2018 in a broad-based slowdown, while China's factory activity also contracted for the first time in 19 months in December.
Gold priced in euros jumped to 1,134.08 euros an ounce, its highest level since mid-June 2017. In sterling terms, gold climbed to its highest level since early September 2017, at 1,022.80 pounds an ounce.
"There is some fading optimism for the euro zone area which is giving gold quite a good lift. It is a continuing trend of what we've seen in the latter part of last year," said Ross Norman, chief executive officer of Sharps Pixley.
Spot gold prices gained about 5 percent last month, the most since January 2017. Some investors expect the precious metal to pass the $1,300 psychological resistance level in the near-term.
Markets are now awaiting views from Federal Reserve Chairman Jerome Powell on the US economic outlook and hints about interest rates in 2019 when he participates in a joint discussion on Friday with former Fed heads Janet Yellen and Ben Bernanke.
There are expectations that a three-year rate-hiking cycle in the United States has come to a close, which would be beneficial for non-yielding bullion.
Further pointers are expected this week from a closely watched survey on US manufacturing, due on Thursday, followed by the December payrolls report on Friday.
Among other precious metals, palladium fell 0.6 percent to $1,255.99 an ounce.
Silver gained 0.5 percent to $15.52, having earlier touched its highest since July 31 at $15.61, while platinum rose 0.7 percent to $796.90.
Soya up
CHICAGO: US soyabean futures climbed to a one-week high on Wednesday on declining yield prospects in Brazil and optimism about US trade relations with top global soya buyer China, traders said.
Wheat futures rose, rebounding from multi-month lows on short-covering and concerns about excessive rains in Argentina, while corn was mixed in choppy trade.
As of 11:49 a.m. CST (1749 GMT), Chicago Board of Trade March soyabeans were up 14 cents at $9.09 per bushel. CBOT March wheat was up 5-1/4 cents at $5.08-1/2 a bushel, and March corn was flat at $3.75 a bushel.
Soyabeans led the way up and were on track to climb about 1.6 percent in the first trading day of the new year. Traders and analysts cited dry conditions in crop areas of central Brazil.
Analysts also cited optimism that China might buy more US soyabeans as a trade delegation heads to Beijing for trade talks, although cash bids for soyabeans shipped to the US Gulf export terminal showed little change on Wednesday. A media report last week said a US trade team would travel to Beijing the week of January 7 for talks.
Excessive rains in parts of Argentina lent support to both CBOT soyabean and wheat futures, analysts said. The moisture, coupled with forecasts for more rains in the next 10 days, could prompt a downgrade in the size or quality of Argentina's wheat crop.